package com.shengdai.urms.core.model;

import java.util.Calendar;

/**
 */
public class UmSpuser implements java.io.Serializable {

	public static final String	SPUSER_STATUS_SY	= "SY";						// 使用
	public static final String	SPUSER_STATUS_TY	= "TY";						// 停用
	public static final String	SPUSER_STATUS_SC	= "SC";						// 删除


	/**
	 *
	 */
	private static final long	serialVersionUID	= 30025016L;
	private String				spuserid;											// 超级用户ID
	private String				spusername;										// 超级用户名称
	private String				logonid;											// 登录帐号
	private String				password;											// 密码
	private String				status;											// 状态 ，使用、停用、删除
	private Calendar			age;												// 使用期限
	private Float				showorder;											// 显示顺序
	private String				framesetid;										// 默认框架

	/**
	 * 判断用户是否合法
	 *
	 * @return
	 */
	public boolean isValid() {
		if (this.getAge() == null)
			return SPUSER_STATUS_SY.equals(this.getStatus());
		else
			return SPUSER_STATUS_SY.equals(this.getStatus()) && this.getAge().after(Calendar.getInstance());
	}

	public String getSpuserid() {
		return spuserid;
	}

	public void setSpuserid(String spuserid) {
		this.spuserid = spuserid;
	}

	public String getSpusername() {
		return spusername;
	}

	public void setSpusername(String spusername) {
		this.spusername = spusername;
	}

	public String getLogonid() {
		return logonid;
	}

	public void setLogonid(String logonid) {
		this.logonid = logonid;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Float getShoworder() {
		return showorder;
	}

	public void setShoworder(Float showorder) {
		this.showorder = showorder;
	}

	public String getFramesetid() {
		return framesetid;
	}

	public void setFramesetid(String framesetid) {
		this.framesetid = framesetid;
	}

	public Calendar getAge() {
		return age;
	}

	public void setAge(Calendar age) {
		this.age = age;
	}
}
